home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
A-B
/
ButtonStax.cpt
/
F_X
/
card_3165.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
16KB
|
719 lines
-- card: 3165 from stack: in
-- bmap block id: 5350
-- flags: 0000
-- background id: 2620
-- name:
----- HyperTalk script -----
on openCard
global theScript, cmd
-- Look of a "visual" command in the button's script. Use this
-- command as the default settings of the buttons
put 1 into theLine
repeat until theLine > the number of lines in theScript
if line theLine of theScript contains "visual" then
-- here is the "visual" command. remove any leading spaces
put line theLine of theScript into liner
put 1 into theChar
repeat until char theChar of liner <> space
add 1 to theChar
end repeat
put char theChar to length of liner of liner into liner
-- if the visual stmt is the same as what we last set, then the
-- buttons are already set correctly, and we can exit.
if liner = cmd then exit openCard
--Otherwise, pick out effect, direction, speed & set
-- the corresponding buttons
put 2 into theWord
put the number of words in line theLine of theScript into spword
repeat until theWord > spword
put quote into theButton
put word theWord of line theLine of theScript after theButton
if theButton = quote & "very" or theButton = quote & "barn" then
add 1 to theWord
put " " & word theWord of line theLine of theScript after theButton
end if
put quote after theButton
put "send mouseUp to card button" && thebutton into pushit
do pushit
add 1 to theWord
end repeat
-- if there is no speed specified in the "visual" command, set
-- normal speed
put word spword of line theLine of theScript into speed
if speed <> "slow" and speed <> "fast" then
send mouseUp to button normal
end if
exit openCard
end if
add 1 to theLine
end repeat
if theLine > the number of lines in theScript then
-- the button script does not contain a "visual" command, so set
-- standard defaults
send mouseUp to card button iris
send mouseUp to card button normal
end if
end openCard
on clearFX
set cursor to 4
set hilite of button iris to false
set hilite of button wipe to false
set hilite of button "scroll" to false
set hilite of button "barn door" to false
set hilite of button "dissolve" to false
set hilite of button "checkerboard" to false
set hilite of button "venetian blinds" to false
set hilite of button "zoom" to false
end clearFX
on clearDirection
set cursor to 4
set hilite of button up to false
set hilite of button down to false
set hilite of button left to false
set hilite of button right to false
set hilite of button open to false
set hilite of button close to false
end clearDirection
on clearSpeed
set cursor to 4
set hilite of button "very fast" to false
set hilite of button fast to false
set hilite of button normal to false
set hilite of button slow to false
set hilite of button "very slow" to false
end clearSpeed
-- part 1 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=41 top=142 right=164 bottom=141
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Wipe
----- HyperTalk script -----
on mouseUp
global fx
clearFX
put "wipe" into fx
set the hilite of button fx to true
hide button Open
hide button close
show button up
show button down
show button left
show button right
send mouseUp to button left
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=41 top=169 right=191 bottom=141
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Zoom
----- HyperTalk script -----
on mouseUp
global fx
clearFX
put "zoom" into fx
set the hilite of button fx to true
show button Open
show button close
hide button up
hide button down
hide button left
hide button right
send mouseUp to button open
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=41 top=196 right=218 bottom=141
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Barn Door
----- HyperTalk script -----
on mouseUp
global fx
clearFX
put "barn door" into fx
set the hilite of button "barn door" to true
show button Open
show button close
hide button up
hide button down
hide button left
hide button right
send mouseUp to button open
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=41 top=222 right=244 bottom=141
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Dissolve
----- HyperTalk script -----
on mouseUp
global fx, dir
clearFX
put "dissolve" into fx
put empty into dir
set the hilite of button fx to true
hide button Open
hide button close
hide button up
hide button down
hide button left
hide button right
end mouseUp
-- part 5 (button)
-- low flags: 80
-- high flags: 8006
-- rect: left=205 top=117 right=139 bottom=305
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Left
----- HyperTalk script -----
on mouseUp
global dir
put "left" into dir
clearDirection
set the hilite of button dir to true
end mouseUp
-- part 6 (button)
-- low flags: 80
-- high flags: 8006
-- rect: left=205 top=143 right=165 bottom=305
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Right
----- HyperTalk script -----
on mouseUp
global dir
put "right" into dir
clearDirection
set the hilite of button dir to true
end mouseUp
-- part 7 (button)
-- low flags: 80
-- high flags: 8006
-- rect: left=205 top=170 right=192 bottom=305
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Up
----- HyperTalk script -----
on mouseUp
global dir
put "up" into dir
clearDirection
set the hilite of button dir to true
end mouseUp
-- part 8 (button)
-- low flags: 80
-- high flags: 8006
-- rect: left=205 top=196 right=218 bottom=305
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Down
----- HyperTalk script -----
on mouseUp
global dir
put "down" into dir
clearDirection
set the hilite of button dir to true
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=339 top=169 right=191 bottom=439
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Normal
----- HyperTalk script -----
on mouseUp
global sp
put empty into sp
clearspeed
set the hilite of button "normal" to true
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=339 top=142 right=164 bottom=439
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fast
----- HyperTalk script -----
on mouseUp
global sp
put "fast" into sp
clearspeed
set the hilite of button sp to true
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=339 top=116 right=138 bottom=439
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Very Fast
----- HyperTalk script -----
on mouseUp
global sp
put "very fast" into sp
clearspeed
set the hilite of button sp to true
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: C006
-- rect: left=339 top=196 right=218 bottom=439
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Slow
----- HyperTalk script -----
on mouseUp
global sp
put "slow" into sp
clearspeed
set the hilite of button sp to true
end mouseUp
-- part 13 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=339 top=222 right=244 bottom=439
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Very Slow
----- HyperTalk script -----
on mouseUp
global sp
put "very slow" into sp
clearspeed
set the hilite of button sp to true
end mouseUp
-- part 14 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=41 top=248 right=270 bottom=141
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Scroll
----- HyperTalk script -----
on mouseUp
global fx
clearFX
put "scroll" into fx
set the hilite of button fx to true
hide button Open
hide button close
show button up
show button down
show button left
show button right
send mouseUp to button left
end mouseUp
-- part 15 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=41 top=274 right=296 bottom=156
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Checkerboard
----- HyperTalk script -----
on mouseUp
global fx, dir
clearFX
put "checkerboard" into fx
put empty into dir
set the hilite of button fx to true
hide button Open
hide button close
hide button up
hide button down
hide button left
hide button right
end mouseUp
-- part 16 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=41 top=300 right=322 bottom=165
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Venetian Blinds
----- HyperTalk script -----
on mouseUp
global fx, dir
clearFX
put "venetian blinds" into fx
put empty into dir
set the hilite of button fx to true
hide button Open
hide button close
hide button up
hide button down
hide button left
hide button right
end mouseUp
-- part 17 (button)
-- low flags: 00
-- high flags: C006
-- rect: left=41 top=116 right=138 bottom=141
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Iris
----- HyperTalk script -----
on mouseUp
global fx
clearFX
put "iris" into fx
set the hilite of button fx to true
show button Open
show button close
hide button up
hide button down
hide button left
hide button right
send mouseUp to button open
end mouseUp
-- part 18 (button)
-- low flags: 00
-- high flags: C006
-- rect: left=205 top=222 right=244 bottom=305
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Open
----- HyperTalk script -----
on mouseUp
global dir
put "open" into dir
clearDirection
set the hilite of button dir to true
end mouseUp
-- part 19 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=205 top=248 right=270 bottom=305
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Close
----- HyperTalk script -----
on mouseUp
global dir
put "close" into dir
clearDirection
set the hilite of button dir to true
end mouseUp
-- part 20 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=339 top=265 right=287 bottom=439
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: OK
----- HyperTalk script -----
on mouseUp
global cmd, fx, dir, sp, theScript
-- fx, dir and sp contain the pieces of the command to be inserted
-- into the button script, first build the command. Since not all
-- effects use a direction, and since speed defaults to normal, we
-- must verify that they are present before we insert them, or we
-- wind up with exterraneous spaces that louse up comparisons later.
put "visual" && fx into cmd
if dir <> empty then put " " & dir after cmd
if sp <> empty then put " " & sp after cmd
-- return to the card containing both the "Button F/X" button and the
-- button to be modified
pop card
get the script of button the number of buttons
put it into theScript
-- look for an existing "visual" command in the button script. If
-- present, remove it.
put 1 into theLine
put the number of lines in theScript into endpt
repeat until theLine>endpt
if line theLine of theScript contains "visual" then
-- take everything ahead of the line containing the "visual",
-- plus everything after it, but not the line itself.
put line 1 to theLine-1 of theScript & return & line theLine+1 to the number of lines in theScript of theScript into theScript
-- since we just removed a line, our endpt moves up
subtract 1 from endpt
exit repeat
end if
add 1 to theLine
end repeat
-- add our "visual" command and update the button script
put return && cmd after line 1 of theScript
set the script of button the number of buttons to theScript
-- mission accomplished. go home.
end mouseUp
-- part 21 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=339 top=295 right=317 bottom=439
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Cancel
----- HyperTalk script -----
on mouseUp
pop card
end mouseUp
-- part 24 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=16 top=32 right=53 bottom=167
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: source
-- part 25 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=210 top=295 right=317 bottom=310
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseUp
visual iris open slow
push card
go next
end mouseUp
-- part contents for background part 6
----- text -----
iris
wipe
zoom
barn-door
dissolve
scroll
checkerboard
venetiona blind
-- part contents for background part 16
----- text -----
left
right
up
down
open
close
-- part contents for background part 17
----- text -----
very fast
fast
normal
slow
very slow
-- part contents for card part 24
----- text -----
target
-- part contents for background part 18
----- text -----
Button F/X